<HTML><HEAD><TITLE>minimize_bound_check</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(fd)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>minimize_bound_check</H1>
If within a minimization, force a check of the cost variable against
the cost bound, which may lead to earlier failure.


<DL>
</DL>
<H2>Description</H2>
   This predicate can be used within a goal that is being minimized
   using minimize/2 or any of its variants. If used in other contexts
   it has no effect just succeeds.

<P>
   The behaviour of minimize/2 is such that the cost bound is tightened
   whenever a better solution is found, but this tightening does not
   trigger an automatic check.  It can therefore be advantageous and
   lead to earlier failure when minimize_bound_check/0 is called after
   every labeling step.

<P>

<H3>Fail Conditions</H3>
   Fails if the current cost cannot become smaller that the cost bound.


<H3>Resatisfiable</H3>
   No.
<H2>Examples</H2>
<PRE>
    labeling([]).
    labeling([X|Xs]) :-
	% do the check urgently, before any propagation happens
	call_priority((indomain(X), minimize_bound_check), 2),
	labeling(Xs).




</PRE>
<H2>See Also</H2>
<A HREF="../../lib/fd/minimize-2.html">minimize / 2</A>, <A HREF="../../lib/fd/minimize-4.html">minimize / 4</A>, <A HREF="../../lib/fd/minimize-6.html">minimize / 6</A>, <A HREF="../../lib/fd/minimize-8.html">minimize / 8</A>
</BODY></HTML>
